package org.xxpay;

import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.stereotype.Component;
import org.xxpay.guava.DefaultGuavaCacheManager;

/**
 * @Package
 * @Class: ApplicationStartup.java
 * @Description:
 * @Author leo
 * @Date 2019/2/17 16:58
 * @Version
 **/
@Slf4j
@Component
public class ApplicationStartup implements ApplicationRunner {

    /**
     * 会在服务启动完成后立即执行
     */
    @Override
    public void run(ApplicationArguments args) throws Exception {
        log.info("Successful service startup!");
        log.info("初始化guava缓存：{}", DefaultGuavaCacheManager.initGuavaCache());
    }

}
